﻿namespace Grove.Cards.Usg
{
	using System.Collections.Generic;
	using Grove.Core;
	using Grove.Core.Ai;
	using Grove.Core.Details.Cards;
	using Grove.Core.Details.Cards.Effects;
	using Grove.Core.Details.Cards.Triggers;
	using Grove.Core.Dsl;
	using Grove.Core.Targeting;
	using Grove.Core.Zones;

	public class AcidicSlime : CardsSource
  {
    public override IEnumerable<ICardFactory> GetCards()
    {
      yield return C.Card
        .Named("Acidic Slime")
        .ManaCost("{3}{G}{G}")
        .Type("Creature Ooze")
        .InSets("Urza's Saga")
        .Text(
          "{Deathtouch}{EOL}When Acidic Slime enters the battlefield, destroy target artifact, enchantment, or land.")
        .Power(2)
        .Toughness(2)
        .Timing(Timings.FirstMain())
        .Abilities(
          Static.Deathtouch,
          C.TriggeredAbility(
            "When Acidic Slime enters the battlefield, destroy target artifact, enchantment, or land.",
            C.Trigger<OnZoneChange>((t, _) => t.To = Zone.Battlefield),
            C.Effect<DestroyTargetPermanent>(),
            C.Validator(Validators.Permanent(
              card => card.Is().Artifact || card.Is().Enchantment || card.Is().Land)),
            selectorAi: TargetSelectorAi.OrderByDescendingScore(),
            abilityCategory: EffectCategories.Destruction)
        );
    }
  }
}